{template header}

<!--{if $webglobal[mode]=='adminuseradd'}-->

	<table class="menutable" cellspacing="1">
		<thead>
			<tr><td>后台管理帐号</td></tr>
		</thead>
		<tbody>
			<tr><td>
				<a href="{ADMIN_WEBURLPATH}/index.php?mode=adminuser">[后台帐号管理]</a>
			</td></tr>
		</tbody>
	</table>

	<form name="addform" method="post" action="{ADMIN_WEBURLPATH}/index.php?mode=adminuseradd&check">
	<table class="datatable" cellspacing="1">
		<thead>
			<tr><td colspan="2">添加后台管理帐号</td></tr>
		</thead>
		<tbody>
			<tr>
				<th>用户名<div>字母和数字组成4-15位且以字母开头</div></th>
				<td>
					<input type="text" name="username" size="32" value="" />
				</td>
			</tr>
			<tr>
				<th>密码<div>长度不得少于6位且不能为纯数字</div></th>
				<td>
					<input type="text" name="password" size="32" value="" />
				</td>
			</tr>
			<tr>
				<th>真实姓名</th>
				<td>
					<input type="text" name="truename" size="32" value="" />
				</td>
			</tr>
			<tr>
				<th>用户组</th>
				<td>
					<select name="usergroup">
					<option value="0">选择用户组...</option>
					<!--{loop $webglobal['file_adminuser']['usergroup'] $groupid $groupData}-->
					<option value="{$groupid}">{$groupData[name]}</option>
					<!--{/loop}-->
					</select>
				</td>
			</tr>
			<tr>
				<th>是否系统账号<div>如果为系统账号,将拥有所有权限</div></th>
				<td>
					<input type="checkbox" name="issystem" value="1" />是
				</td>
			</tr>
		</tbody>
		<tfoot>
			<tr><td colspan="2">
				<input type="submit" name="ausubmit" class="submitok" value=" 确  认 " />&nbsp;&nbsp;
				<input type="reset" name="aureset" value=" 取  消 " />
			</td></tr>
		</tfoot>
	</table>
	</form>

<!--{elseif $webglobal[mode]=='adminuseredit'}-->

	<table class="menutable" cellspacing="1">
		<thead>
			<tr><td>后台管理帐号</td></tr>
		</thead>
		<tbody>
			<tr><td>
				<a href="{ADMIN_WEBURLPATH}/index.php?mode=adminuser">[后台帐号管理]</a>
			</td></tr>
		</tbody>
	</table>

	<form name="addform" method="post" action="{ADMIN_WEBURLPATH}/index.php?mode=adminuseredit&check">
	<input type="hidden" name="editid" value="$webrequest[editid]" />
	<table class="datatable" cellspacing="1">
		<thead>
			<tr><td colspan="2">修改后台管理帐号</td></tr>
		</thead>
		<tbody>
			<tr>
				<th>用户名</th>
				<td>$webglobal[file_adminuser][editinfo][username]</td>
			</tr>
			<tr>
				<th>密码<div>长度不得少于6位且不能为纯数字</div></th>
				<td>
					<input type="text" name="password" size="32" value="" />
				</td>
			</tr>
			<tr>
				<th>真实姓名</th>
				<td>
					<input type="text" name="truename" size="32" value="$webglobal[file_adminuser][editinfo][truename]" />
				</td>
			</tr>
			<tr>
				<th>用户组</th>
				<td>
					<select name="usergroup">
					<option value="0">选择用户组...</option>
					<!--{loop $webglobal['file_adminuser']['usergroup'] $groupid $groupData}-->
					<option value="{$groupid}"{if $webglobal[file_adminuser][editinfo][user_group_id] == $groupid} selected{/if}>{$groupData[name]}</option>
					<!--{/loop}-->
					</select>
				</td>
			</tr>
			<tr>
				<th>是否系统账号<div>如果为系统账号,将拥有所有权限</div></th>
				<td>
					<input type="checkbox" name="issystem" value="1"{if $webglobal[file_adminuser][editinfo][issystem] == 1} checked{/if} />是
				</td>
			</tr>
		</tbody>
		<tfoot>
			<tr><td colspan="2">
				<input type="submit" name="ausubmit" class="submitok" value=" 确  认 " />&nbsp;&nbsp;
				<input type="reset" name="aureset" value=" 取  消 " />
			</td></tr>
		</tfoot>
	</table>
	</form>

<!--{elseif $webglobal[mode]=='adminuser'}-->

	<table class="menutable" cellspacing="1">
		<thead>
			<tr><td>后台管理帐号</td></tr>
		</thead>
		<tbody>
			<tr><td>
				<a href="{ADMIN_WEBURLPATH}/index.php?mode=adminuseradd">[添加管理帐号]</a>
			</td></tr>
		</tbody>
	</table>

	<table class="datatable" cellspacing="1">
		<thead>
			<tr>
				<th width="5%">编号</th>
				<th>用户名</th>
				<th>真实姓名</th>
				<th width="10%">所在用户组</th>
				<th width="10%">是否系统账号</th>
				<th width="25%">操作</th>
			</tr>
		</thead>
		<tbody>
			<!--{if $webglobal[file_adminuser][usernum]>0}-->
				<!--{loop $webglobal[file_adminuser][showtable] $temptable}-->
				<tr>
					<td{$temptable[tdclass]}>$temptable[id]</td>
					<td{$temptable[tdclass]}>$temptable[username]</td>
					<td{$temptable[tdclass]}>$temptable[truename]</td>
					<td{$temptable[tdclass]}>$temptable[groupname]</td>
					<td{$temptable[tdclass]}>
						<!--{if $temptable[issystem]}-->
						<span class="green">是</span>
						<!--{else}-->
						否
						<!--{/if}-->
					</td>
					<td{$temptable[tdclass]}>
						<a href="{ADMIN_WEBURLPATH}/index.php?mode=adminuseredit&editid=$temptable[id]">[编辑]</a>
						&nbsp;&nbsp;<a href="javascript:common_ConfirmGoUrl('确定要删除该管理帐号么？','{ADMIN_WEBURLPATH}/index.php?mode=adminuserdel&delid={$temptable[id]}')">[删除]</a>
						&nbsp;&nbsp;<a href="{ADMIN_WEBURLPATH}/index.php?mode=adminlog&searchkey=$temptable[username]">[操作记录]</a>
					</td>
				</tr>
				<!--{/loop}-->
			<!--{else}-->
				<tr><td colspan="3" style="text-align: center">没有管理帐号。</td></tr>
			<!--{/if}-->
		</tbody>
	</table>

	{template page}

<!--{elseif $webglobal[mode]=='adminlog'}-->

	<form name="delform" method="post" action="{ADMIN_WEBURLPATH}/index.php?mode=adminlog&dellog">
	<table class="datatable" cellspacing="1">
		<thead>
			<tr>
				<td colspan="3">删除日志</td>
			</tr>
		</thead>
		<tbody>
			<tr>
				<th style="width: 100px;">删除选项</th>
				<td>
					<input type="text" name="deldaynum" value="$webglobal[file_system][delday]" size="5" /> 天前&nbsp;&nbsp;
					<input type="checkbox" name="onlylogin" id="onlylogin" value="1" checked="checked" /><label for="onlylogin">仅登录信息</label>
				</td>
				<td style="width: 100px; text-align: center"><input type="submit" name="systemsubmit" value=" 确  定 " /></td>
			</tr>
		</tbody>
	</table>
	</form>

	<form name="searchform" method="post" action="{ADMIN_WEBURLPATH}/index.php?mode=adminlog">
	<table class="datatable" cellspacing="1">
		<thead>
			<tr>
				<td colspan="3">搜索日志</td>
			</tr>
		</thead>
		<tbody>
			<tr>
				<th style="width: 100px;">搜索选项</th>
				<td><input type="text" name="searchkey" value="$webrequest[searchkey]" size="50" /></td>
				<td style="width: 100px; text-align: center"><input type="submit" name="searchsubmit" value=" 搜  索 " /></td>
			</tr>
		</tbody>
	</table>
	</form>

	<table class="datatable" cellspacing="1">
		<thead>
			<tr>
				<th width="5%">编号</th>
				<th width="15%">用户名</th>
				<th width="50%">日志内容</th>
				<th width="15%">时间</th>
				<th width="15%">IP</th>
			</tr>
		</thead>
		<tbody>
			<!--{if $webglobal[file_system][lognum]>0}-->
				<!--{loop $webglobal[file_system][showtable] $temptable}-->
				<tr>
					<td{$temptable[tdclass]}>$temptable[id]</td>
					<td{$temptable[tdclass]}>$temptable[admin_username] (UID: {$temptable[admin_user_id]})</td>
					<td{$temptable[tdclass]}>$temptable[log]</td>
					<td{$temptable[tdclass]}>$temptable[time_show]</td>
					<td{$temptable[tdclass]}>$temptable[ip]</td>
				</tr>
				<!--{/loop}-->
			<!--{else}-->
				<tr><td colspan="5" style="text-align: center">没有符合条件的日志记录。</td></tr>
			<!--{/if}-->
		</tbody>
	</table>

	{template page}

<!--{elseif $webglobal[mode]=='adminupsql'}-->

	<form name="editform" method="post" action="{ADMIN_WEBURLPATH}/index.php?mode=adminupsql&check">
		<table class="datatable" cellspacing="1">
		<thead>
			<tr><td colspan="2">数据库升级</td></tr>
		</thead>
		<tbody>
			<tr>
				<td colspan="2" class="need">警告！ 该功能仅供开发人员以及熟悉程序的高级管理员使用，请勿随意操作！</td>
			</tr>
			<tr>
				<th>升级语句</th>
				<td><textarea name="upsql" rows="12" cols="80">$webrequest[upsql]</textarea></td>
			</tr>
			<tr>
				<th>升级密码</th>
				<td><input type="password" name="uppass" size="30" value="" /></td>
			</tr>
		</tbody>
		<tfoot>
			<tr><td colspan="2">
				<input type="submit" name="adminsubmit" class="submitok" value=" 确  认 " />&nbsp;&nbsp;
				<input type="reset" name="adminreset" value=" 取  消 " />
			</td></tr>
		</tfoot>
	</table>
	</form>

<!--{/if}-->


{template footer}